-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: DashboardTimeRangeSlider #1725
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the dimensions array already memoized via the first useMemo hook? i might be wrong on this one...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✔️
@noahonyejese yep, technically the dimensions should come memoized from the first hook, except when it's still fetching the data; in this case the result could be null, and using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@bprusinowski, looks good. Thanks |
Fixes #1617
This PR fixes a problem of wrong positioning of marks in
DashboardTimeRangeSlider
. Due to the conversion of dates to milliseconds, and interpolation of values between min and max dates, there were some non-obvious issues with marks positioning. To see one such issue, see this link from TEST and slide through the slider values – see that 2022 and 2023 and extra-close to each other, while they should have the same spacing as previous years.To fix this issue, I changed the Slider's behavior from continuous to discrete, passing the values that actually appear in the data. It also makes sure that we use combined values from merged date dimension.
How to test